1. Field of the Invention
The present invention relates to a method and apparatus for processing an image, including the process of converting the image to an n-level image, and also to a recording medium.
2. Description of the Related Art
A color copying machine is known which makes a copy of an original document using four color component signals C (cyan), M (magenta), Y (yellow), and Bk (black) in the form of two-level signals generated from a digital image signal of the document.
FIG. 2 is a schematic diagram illustrating such a type of color copying machine. In FIG. 2, an image scanner 201 reads image data from a document and performs digital signal processing on the image data. In accordance with the document image data obtained via the image scanner 201, a printer 202 outputs a full-color image on paper.
In the image scanner 201, a document 204 is placed on a document glass plate (hereinafter referred to as a platen) 203, and a mirror-surface pressure plate 200 is placed on the document 204. The document 204 is illuminated by lamps 205. Light reflected from the document 204 is directed by mirrors 206, 207, and 208 to a lens 209 which in turn focuses the light onto a three-line solid state image sensor (hereinafter referred to as a CCD) 210 so that an image of the document 204 is formed on the CCD 210. A full-color image signal including red (R), green (G), and blue (B) components is generated by the CCD 210 and sent to a signal processor 211. The lamps 205 and the mirror 206 are moved at a speed v and the mirrors 207 and 208 at a speed v/2 in a direction perpendicular to the direction of electric scanning performed by the line sensor thereby scanning (secondary-scanning) the whole surface of the document. The image of the document 204 obtained by the scanning has a resolution of 400 dpi (dots per inch) in both primary and secondary scanning directions.
The signal processor 211 performs an electronic process on the image signal obtained by the scanning so as to decompose the image signal into magenta (M), cyan (C), yellow (Y), and black (Bk) components. The resultant color component signals are sent to the printer 202. The respective color component signals M, C, Y, and Bk are converted to two-level signals having a value of either 0 or 1 by means of a known binarization technique such as an error diffusion method. When the document is scanned by the image scanner 201, one of color component signals M, C, Y, and Bk is generated and sent to the printer 202. Thus, the document must be scanned four times to obtain a printed image.
In the error diffusion method, as disclosed for example in a paper titled xe2x80x9cAn adaptive algorithm for the spatial gray scalexe2x80x9d (R. Floyd and L. Steinberg, SID 75 Digest, pp.36-67), multilevel image data of a pixel of interest is converted to two-level data (representing either a black or white level), and the error of the two-level data relative to the original multilevel image data is weighted according to a predefined rule. The error is diffused by adding the weighted error to the data of pixels neighboring of the pixel of interest. In this method, the original multilevel image data can be converted to two-level data while preserving the density of the original image. The conversion to two-level data is performed independently for each of color component signals M, C, Y, and Bk.
The image signal including the color component signals M, C, Y, and Bk transmitted from the image scanner 201 is applied to a laser driver 212. In response to the image signal, the laser driver 212 drives a semiconductor laser 213 so that the optical output of the semiconductor laser 213 is modulated in accordance with the color component signals. When the image signal has a value equal to 0 the laser is not turned on, but the laser is turned on when the image signal has a value equal to 1. Thus, two-level image data is written on a photosensitive drum 217 depending on whether the image signal is equal to 0 or 1. The laser beam scans the photosensitive drum 217 via a polygon mirror 214, an f-2 lens 215, and a mirror 216. As in the reading operation, the writing operation is also performed so that the written image has a resolution of 400 dpi (dots per inch) in both primary and secondary scanning directions.
There is also provided a rotating developing device 218 including a magenta developing unit 219, a cyan developing unit 220, a yellow developing unit 221, and a black developing unit 222. The four developing units alternately come into contact with the photosensitive drum 217. The electrostatic latent image formed on the photosensitive drum is developed with toner. In the developing process, toner is put on those pixels which are exposed to the laser beam, while no toner is put on those pixels which are not exposed to the laser beam. Thus, a toner image corresponding to the two-level image data written on the drum is created.
Paper is fed from a paper cassette 224 or 225 toward a transfer drum 223. The paper is wound around the transfer drum 223, and the image developed on the photosensitive drum 217 is transferred to the paper.
The image transfer is performed successively for four colors M, C, Y, and Bk. The paper is then passed through a fixing unit 226 so as to fix the toner to the paper. The paper is then fed out.
In the color copying machine constructed in the above-described manner, the image signal which has been converted to two-level signal for each color component may be temporarily stored in a buffer memory so that the image may be printed at a desired arbitrary time after completion of the image reading process. This makes it possible to print an image for example after performing 90xc2x0-rotation on the image data stored in the buffer memory, or print a composite image by combining a plurality of pages into one page.
However, when the printed image has a density higher or lower than the expected density, or when the color of the printed image is different from the expected color, it is difficult to make a correction because the image signal has already been quantized to two levels, that is, either a white or black level, for each color component.
It is an object of the present invention to provide a method for processing an image in such a manner that excellent color reproduction is achieved regardless of whether the image is reproduced from m-level data or n-level data (where m and n are integer).
It is another object of the present invention to provide a method for processing an image, in which a desired color correction may be made on n-level data.
According to one aspect of the present invention, there is provided a method of processing an image, having first and second modes, wherein in the first mode m-level color data is converted to n (n less than m)-level color data, and wherein in the second mode n-level color data is first converted to m-level color data and further converted to n-level color data.
According to another aspect of the present invention, there is provided a method of processing an image, including the steps of: mannually inputting correction information, setting a look-up table associated with conversion to m-level data in accordance with the correction information, and converting n (n less than m)-level data to m-level data using the set look-up table.
These and other features and objects will become apparent from the following detailed description in conjunction with the accompanying drawings.